BASS_WASAPI_GetData

Retrieves the immediate sample data or an FFT representation of it.

DWORD BASS_WASAPI_WASAPI_GetData(
    void *buffer
    DWORD length
);

Parameters
bufferPointer to a buffer to receive the data.
lengthNumber of bytes wanted, and/or the BASS_ChannelGetData flags.

Return value
If an error occurs, -1 is returned, use BASS_ErrorGetCode to get the error code. When requesting FFT data, the number of bytes read from the device buffer (to perform the FFT) is returned. When requesting sample data, the number of bytes written to buffer will be returned. When using the BASS_DATA_AVAILABLE flag, the number of bytes in the device's buffer is returned.

Error codes
BASS_ERROR_INITBASS_WASAPI_Init has not been successfully called.
BASS_ERROR_NOTAVAILThe BASS_WASAPI_BUFFER flag was not specified in the device's initialization.

Remarks
This function uses BASS_ChannelGetData internally, so it has the same options available.

The BASS_WASAPI_BUFFER flag needs to have been specified in the device's initialization to enable the use of this function, except for with the BASS_DATA_AVAILABLE flag.

See also
BASS_WASAPI_GetDeviceLevel, BASS_WASAPI_GetLevel

BASS_ChannelGetData